package com.zhao.framework;
 

/**
 * 
 * {success:boolean,msg:'some message',json:javascripttype}
 */
public class Result {
	boolean success;
	String msg;
	Object json;
	
	/**
	 * @param success
	 * @param msg
	 * @param json can be any model(pojo) object
	 * @return
	 */
	static public String get(boolean success,String msg, Object json){
		Result r = new Result();
		r.setSuccess(success);
		r.setMsg(msg);
		r.setJson(json);
		return Json.from(r);
	}
	/**
	 * @return the success
	 */
	public boolean isSuccess() {
		return success;
	}
	/**
	 * @param success the success to set
	 */
	public void setSuccess(boolean success) {
		this.success = success;
	}
	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}
	/**
	 * @param msg the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}
	/**
	 * @return the json
	 */
	public Object getJson() {
		return json;
	}
	/**
	 * @param json the json to set
	 */
	public void setJson(Object json) {
		this.json = json;
	}}
